package com.guigu.www.service.impl;

import com.guigu.www.pojo.Question;
import com.guigu.www.pojo.TQuestionAnwser;
import com.guigu.www.mapper.TQuestionAnwserMapper;
import com.guigu.www.service.TQuestionAnwserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yb
 * @since 2021-06-18
 */
@Service
public class TQuestionAnwserServiceImpl extends ServiceImpl<TQuestionAnwserMapper, TQuestionAnwser> implements TQuestionAnwserService {

    @Autowired
    private TQuestionAnwserMapper  dao;

    @Override
    public Question selanwser(TQuestionAnwser tQuestionAnwser) {
        TQuestionAnwser tQuestionAnwser1 = tQuestionAnwser.setQuestid(1);
        List<TQuestionAnwser> phz = dao.selanwser(tQuestionAnwser1);
        TQuestionAnwser tQuestionAnwser2 = tQuestionAnwser.setQuestid(2);
        List<TQuestionAnwser> qxz = dao.selanwser(tQuestionAnwser2);
        TQuestionAnwser tQuestionAnwser3 = tQuestionAnwser.setQuestid(3);
        List<TQuestionAnwser> yingxz = dao.selanwser(tQuestionAnwser3);
        TQuestionAnwser tQuestionAnwser4 = tQuestionAnwser.setQuestid(4);
        List<TQuestionAnwser> yangxz = dao.selanwser(tQuestionAnwser4);
        TQuestionAnwser tQuestionAnwser5 = tQuestionAnwser.setQuestid(5);
        List<TQuestionAnwser> tsz = dao.selanwser(tQuestionAnwser5);
        TQuestionAnwser tQuestionAnwser6 = tQuestionAnwser.setQuestid(6);
        List<TQuestionAnwser> srz = dao.selanwser(tQuestionAnwser6);
        TQuestionAnwser tQuestionAnwser7 = tQuestionAnwser.setQuestid(7);
        List<TQuestionAnwser> xyz = dao.selanwser(tQuestionAnwser7);
        TQuestionAnwser tQuestionAnwser8 = tQuestionAnwser.setQuestid(8);
        List<TQuestionAnwser> qyz = dao.selanwser(tQuestionAnwser8);
        TQuestionAnwser tQuestionAnwser9 = tQuestionAnwser.setQuestid(9);
        List<TQuestionAnwser> tbz = dao.selanwser(tQuestionAnwser9);
        Question question=new Question();
        question.setPhz(phz);
        question.setQxz(qxz);
        question.setYingxz(yingxz);
        question.setYangxz(yangxz);
        question.setTsz(tsz);
        question.setSrz(srz);
        question.setXyz(xyz);
        question.setQyz(qyz);
        question.setTbz(tbz);
        return question;
    }
    @Override
    public Question selanwser2(TQuestionAnwser tQuestionAnwser) {
        TQuestionAnwser tQuestionAnwser1 = tQuestionAnwser.setQuestid(10);
        List<TQuestionAnwser> qth = dao.selanwser(tQuestionAnwser1);
        TQuestionAnwser tQuestionAnwser2 = tQuestionAnwser.setQuestid(11);
        List<TQuestionAnwser> qpzh = dao.selanwser(tQuestionAnwser2);
        TQuestionAnwser tQuestionAnwser3 = tQuestionAnwser.setQuestid(12);
        List<TQuestionAnwser> rjgx = dao.selanwser(tQuestionAnwser3);
        TQuestionAnwser tQuestionAnwser4 = tQuestionAnwser.setQuestid(13);
        List<TQuestionAnwser> yy = dao.selanwser(tQuestionAnwser4);
        TQuestionAnwser tQuestionAnwser5 = tQuestionAnwser.setQuestid(14);
        List<TQuestionAnwser> jl = dao.selanwser(tQuestionAnwser5);
        TQuestionAnwser tQuestionAnwser6 = tQuestionAnwser.setQuestid(15);
        List<TQuestionAnwser> dd = dao.selanwser(tQuestionAnwser6);
        TQuestionAnwser tQuestionAnwser7 = tQuestionAnwser.setQuestid(16);
        List<TQuestionAnwser> kb = dao.selanwser(tQuestionAnwser7);
        TQuestionAnwser tQuestionAnwser8 = tQuestionAnwser.setQuestid(17);
        List<TQuestionAnwser> pz = dao.selanwser(tQuestionAnwser8);
        TQuestionAnwser tQuestionAnwser9 = tQuestionAnwser.setQuestid(18);
        List<TQuestionAnwser> jsbx = dao.selanwser(tQuestionAnwser9);
        Question question=new Question();
        question.setQth(qth);
        question.setQpzh(qpzh);
        question.setRjgx(rjgx);
        question.setYy(yy);
        question.setJl(jl);
        question.setDd(dd);
        question.setKb(kb);
        question.setPz(pz);
        question.setJsbx(jsbx);
        return question;
    }
    @Override
    public void addanwser(TQuestionAnwser tQuestionAnwsers) {
        dao.addanwser(tQuestionAnwsers);
    }
}
